﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Text;

namespace FCNS.KeepMoney.Util
{
    class Mail
    {
        public void SendMail(string body)
        {
            System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.163.com");
            smtp.UseDefaultCredentials = false;
            smtp.Credentials = new System.Net.NetworkCredential("money333888", "money38");
            smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
            System.Net.Mail.MailMessage mes = new System.Net.Mail.MailMessage();
            mes.From = new System.Net.Mail.MailAddress("money333888@163.com");
            mes.To.Add("35464860@qq.com");
            mes.Subject = "KeepMoney";
            mes.Body = DateTime.Now.ToString() + "\r\n" + body;
            smtp.SendAsync(mes, null);
        }
    }
}
